
import { useState } from 'react'

const Detail = () => {
  let [count, setCount] = useState(0); 

    return (
      <div>
        <input type="text" readOnly={true} value={count}/>
        <button onClick={() => setCount(num => num + 1)}>add</button>
      </div>
    )
}

export default Detail;